const routes = [
    {
      // 一级路由
      path: '/index',
      name: 'index',
      component: () => import('../views/Index.vue'),
      // 二级路由
      children:[
        {
          path:'/index/home',
          name:'home',
          meta:{title:'首页'},  //路由元信息========
          component:() => import('../views/Index/SHome.vue'),
        },
        {
          path:'/index/bao',
          name:'bao',
          meta:{title:'爆爆团'},
          component:()=>import('../views/Index/Bao.vue'),
        },
        {
          path:'/index/dan',
          name:'dan',
          meta:{title:'订单'},
          component:()=>import('../views/Index/Dan.vue'),
        },
        {
          path:'/index/ge',
          name:'ge',
          meta:{title:'我的'},
          component:()=>import('../views/Index/Ge.vue'),
        },
      ]
    },
    // 一级路由
    // {
    //   path: '/about',
    //   name: 'about',
    //   component: () => import('../views/About.vue'),
    // },
    {
      path: '/login',
      name: 'login',
      meta:{title:'登录页面'},
      component: () => import('../views/Login.vue'),
    },
    {
      path: '/xqing/:id',
      meta:{title:'详情页'},
      component: () => import('../views/Xqing.vue'),
    },
    {
      // 路由重定向
      path:'/',
      redirect:'/index/home',
    },
    {
      // 404路由找不到指向
      path:'*',
      component:()=>import('../views/NotFound.vue'),
    },
]

export default routes;